package com.specificgroup.jira.plugin.acpro.service;

import com.specificgroup.jira.plugin.acpro.exception.AcproException;
import com.specificgroup.jira.plugin.acpro.model.acpro.AcproLoginData;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.GetAttachmentResponseType;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.GetItemResponseType;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.GetProjectItemsResponseType;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.GetProjectListResponseType;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.GetProjectResponseType;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.GetUserListResponseType;

import java.io.IOException;

/**
 *
 * @author Ivan Holub
 */
public interface AcproService {

    GetProjectListResponseType makeGetProjectsRequest(AcproLoginData acproLoginData) throws IOException, AcproException;

    void login(AcproLoginData acproLoginData) throws IOException, AcproException;

    GetProjectResponseType makeGetProjectRequest(AcproLoginData acproLoginData, String projectKey) throws IOException, AcproException;

    GetProjectItemsResponseType makeGetProjectItemsRequest(AcproLoginData acproLoginData, String projectKey, String startIndex,
                                            String count) throws IOException, AcproException;

    GetItemResponseType makeGetItemRequest(AcproLoginData acproLoginData, String itemKey) throws IOException, AcproException;

    GetUserListResponseType makeUserListRequest(AcproLoginData acproLoginData) throws IOException, AcproException;

    GetAttachmentResponseType makeGetAttachmentRequest(AcproLoginData acproLoginData, String itemKey, String filename) throws IOException, AcproException;

}
